home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / elog.h.z / elog.h
C/C++ Source or Header  |  1992-04-03  |  2KB  |  53 lines

  1. /*    Copyright (c) 1984 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /*#ident    "@(#)kern-port:sys/elog.h    10.3"*/
  9. #ident    "$Revision: 3.8 $"
  10. /*
  11.  * "True" major device numbers. These correspond
  12.  * to standard positions in the configuration
  13.  * table, but are used for error logging
  14.  * purposes only.
  15.  */
  16.  
  17. #define CNTL    1
  18. #define SYS    2
  19. #define CAC    3
  20. #define PF    4
  21.  
  22. /*
  23.  * IO statistics are kept for each physical unit of each
  24.  * block device (within the driver). Primary purpose is
  25.  * to establish a guesstimate of error rates during
  26.  * error logging.
  27.  */
  28.  
  29. struct iostat {
  30.     unsigned long    io_ops;    /* number of read/writes */
  31.     unsigned long    io_misc;/* number of "other" operations */
  32.     unsigned long    io_qcnt;/* number of jobs assigned to drive */
  33.     ushort io_unlog;    /* number of unlogged errors */
  34. };
  35.  
  36. /*
  37.  * structure for system accounting
  38.  */
  39. struct iotime {
  40.     struct iostat ios;
  41.     unsigned long    io_bcnt;/* total blocks transferred */
  42.     time_t    io_resp;    /* total block response time */
  43.     time_t    io_act;        /* total drive active time (cumulative utilization) */
  44.     unsigned long io_wops;  /* number of writes */
  45.     unsigned long io_wbcnt;  /* total blocks written */
  46. };
  47. #define    io_cnt    ios.io_ops
  48. #define io_qc ios.io_qcnt
  49. /* drive utilization times can be calculated by system software as follows */
  50.  
  51. /* Average drive utilization = (io_cact/io_elapt) */
  52. /* Average drive utilization for last interval = (io_liact/io_intv) */
  53.